//
//  MyHomeTableViewCell.m
//  ITHome
//
//  Created by lanou3g on 15/7/14.
//  Copyright (c) 2015年 YAX. All rights reserved.
//

#import "MyHomeTableViewCell.h"

@implementation MyHomeTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

#pragma mark - 自定义cell初始化
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.backgroundColor = [UIColor clearColor];
        
        // 头像
        self.avatarImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 0, 100,100)];
        self.avatarImageView.image = [UIImage imageNamed:@"bt_list_more_button_singer-query_press"];
        self.avatarImageView.layer.masksToBounds = YES;
        self.avatarImageView.layer.borderWidth = 2;
        self.avatarImageView.layer.borderColor = [UIColor whiteColor].CGColor;
        self.avatarImageView.layer.cornerRadius = self.avatarImageView.frame.size.height / 2;
        [self.contentView addSubview:_avatarImageView];
        
        // 用户名
        self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(_avatarImageView.x + _avatarImageView.width + 10, _avatarImageView.height / 2 - 25, kScreenWidth - _avatarImageView.width, 50)];
        self.nameLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:_nameLabel];
    }
    return self;
}

@end
